<?php
use common\service\StaticService;
use common\service\GlobalUrlService;
use shopend\assets\ShopAsset;
StaticService::includeAppJsStatic(GlobalUrlService::buildShopStaticUrl('/backend/active/add.js'),ShopAsset::class);
StaticService::includeAppCssStatic(GlobalUrlService::buildShopStaticUrl('/css/active/add.css'),ShopAsset::class);
?>

<div class="layui-card">
  <div class="layui-card-header">活动添加</div>
  <div class="layui-card-body">
    <div class="add_active">
      <div class="show_step">
        <div class="layui-row">
          <div class="layui-col-md6 layui-col-sm12">
            <div class="show_step_item show_step_item1 active">
              <b>1</b>
              <span>基本信息</span>
            </div>
          </div>
          <div class="layui-col-md6 layui-col-sm12">
            <div class="show_step_item show_step_item2 show_step_item2">
              <b>2</b>
              <span>选择商品</span>
            </div>
          </div>
        </div>
        <div class="layui-progress layui-progress-big" lay-showPercent="true">
          <div class="layui-progress-bar layui-bg-green" lay-percent="1/2"></div>
        </div>
      </div>
      <div class="step step1">
        <form class="layui-from">
          <fieldset class="layui-elem-field">
            <legend>基本信息</legend>
            <div class="layui-field-box">
              <ul>
                <li class="layui-row name">
                  <span class="title layui-col-md2 layui-col-sm3">活动名称</span>
                  <div class="item layui-col-md10 layui-col-sm9">
                    <input type="text" name="" class="layui-input layui-input-inline at_name" />
                    <span class="changeNum">0</span>/45
                  </div>
                </li>
                <li class="layui-row time">
                  <span class="title layui-col-md2 layui-col-sm3">活动时间</span>
                  <div class="item layui-col-md10 layui-col-sm9">
                    <input type="text" name="" class="layui-input layui-input-inline b-time" id="bg_time" />
                    -
                    <input type="text" name="" class="layui-input layui-input-inline e-time" id="ed_time" />
                  </div>
                </li>
                <li class="layui-row number">
                  <span class="title layui-col-md2 layui-col-sm3">活动人数</span>
                  <div class="item layui-col-md10 layui-col-sm9">
                    <input type="text" name="" class="layui-input layui-input-inline join_num" />(2-10)人成团
                  </div>
                </li> 
              </ul>
            </div>
          </fieldset>
        </form>
      </div>
      <div class="step step2">
        <form class="layui-from">
          <fieldset class="layui-elem-field">
            <legend>选择商品</legend>
            <div class="layui-field-box">
              <div class="step2_title">
                <span class="active">①选择商品</span>
                <span>②选择SKU</span>
                <span>③修改信息</span>
              </div>
              <hr>
              <div class="search">
                <input type="text" class="layui-input layui-input-inline search_input" placeholder="搜索商品" />
                <span class="layui-btn search_btn"><i class="layui-icon">&#xe615;</i>搜索</span>
              </div>
              <ul class="goods_list"></ul>
              <div id="goodsListPage"></div>
            </div>
          </fieldset>
        </form>
      </div>
      <div class="step step3">
        <form class="layui-from">
          <fieldset class="layui-elem-field">
            <legend>选择商品</legend>
            <div class="layui-field-box">
              <div class="step2_title">
                <span>①选择商品</span>
                <span class="active">②选择SKU</span>
                <span>③修改信息</span>
              </div>
              <hr>
              <table class="choose-gd layui-table" id="sku_tbody"></table>
            </div>
          </fieldset>
        </form>
      </div>
      <div class="step step4">
        <form class="layui-from">
          <fieldset class="layui-elem-field">
            <legend>选择商品</legend>
            <div class="layui-field-box">
              <div class="step2_title">
                <span>①选择商品</span>
                <span>②选择SKU</span>
                <span class="active">③修改信息</span>
              </div>
              <hr>
              <table class="choose-gd layui-table">
                <thead>
                  <tr>
                    <th class="deep sku">SKU</th>
                    <th class="deep" width="80">图片</th>
                    <th class="deep">拼团价</th>
                    <th class="deep">原价</th>
                    <th class="deep">拼团库存</th>
                  </tr>
                </thead>
                <tbody id="Th_tbody">
                </tbody>
              </table>
            </div>
          </fieldset>
        </form>
      </div>
      <div class="btns">
        <!-- <button class="layui-btn">取消</button> -->
        <button class="layui-btn prev prev-pt">上一步</button>
        <button class="layui-btn next next-pt">下一步</button>
        <button class="layui-btn ok">完成</button>
        <a class="layui-btn layui-btn-primary" href="<?= GlobalUrlService::buildShopUrl('active/index')?>">取消</a>
      </div>
    </div>
  </div>
</div>
